Skip to content

Commit

Permalink
trimming down features, writing up ideas
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdoiel committed Oct 10, 2023
1 parent ba2b668 commit 3adbe30
Show file tree
Hide file tree
Showing 38 changed files with 207 additions and 207 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ authors:


repository-code: "git+https://github.com/rsdoiel/skimmer"
version: 0.0.3
version: 0.0.4
license-url: "https://spdx.org/licenses/MIT"

12 changes: 7 additions & 5 deletions INSTALL.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">Install</a></li>
<li><a href="search.html">Project Search</a></li>
<li><a href="ideas.html">Someday, Maybe</a></li>
<li><a href="https://github.com/rsdoiel/stngo">GitHub</a></li>
<li><a href="about.html">About</a></li>
</ul>
Expand Down Expand Up @@ -195,11 +196,11 @@ <h3 id="windows-11">Windows 11</h3>
<h2 id="compiling-from-source">Compiling from source</h2>
<p><em>skimmer</em> is “go get-able”. Use the “go get” command to download the dependent packages as well as <em>skimmer</em>’s source code.</p>
<pre class="shell"><code> go get -u github.com/rsdoiel/skimmer/...</code></pre>
<h3 id="requirements-for-compiling">Requirements for compiling</h3>
<h3 id="requirements-for-compiling-using-gnu-make">Requirements for compiling using GNU Make</h3>
<ol type="1">
<li>Git</li>
<li>GNU Make</li>
<li>SQLite 3</li>
<li>Git &gt;= 2</li>
<li>GNU Make &gt;= 3.8</li>
<li>SQLite3 &gt; 3.4</li>
<li>Pandoc &gt; 3</li>
<li>Go &gt;= 1.21.1</li>
</ol>
Expand All @@ -212,11 +213,12 @@ <h3 id="compiling-on-a-posix-system">Compiling on a POSIX system</h3>
make test
make install</code></pre>
<h4 id="compiling-on-a-windows-machine">Compiling on a Windows machine</h4>
<p>For Windows you need to have Go installed. I am assuming you will NOT be regenerating versions.go using Pandoc.</p>
<p>On a Windows box in the command shell these are the steps I would take</p>
<pre class="shell"><code> cd %userprofile%
set PATH=%PATH%;%userprofile%\bin
go build cmd\skimmer\skimmer.go
copy skimmer.exe %userprofile%\bin\
move skimmer.exe %userprofile%\bin\
skimmer -version</code></pre>
</section>

Expand Down
14 changes: 8 additions & 6 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,14 @@ as well as _skimmer_'s source code.
go get -u github.com/rsdoiel/skimmer/...
```

### Requirements for compiling
### Requirements for compiling using GNU Make

1. Git
2. GNU Make
3. SQLite 3
1. Git >= 2
2. GNU Make >= 3.8
3. SQLite3 > 3.4
4. Pandoc > 3
5. Go >= 1.21.1


### Compiling on a POSIX system

If you have all the required software (e.g. Git, GNU Make, Pandoc, SQLite3, Go)
Expand All @@ -226,13 +225,16 @@ you can clone the repository and then compile in the traditional POSIX manner.

#### Compiling on a Windows machine

For Windows you need to have Go installed. I am assuming you will NOT be regenerating versions.go
using Pandoc.

On a Windows box in the command shell these are the steps I would take

```shell
cd %userprofile%
set PATH=%PATH%;%userprofile%\bin
go build cmd\skimmer\skimmer.go
copy skimmer.exe %userprofile%\bin\
move skimmer.exe %userprofile%\bin\
skimmer -version
```

77 changes: 27 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@

# skimmer

skimmer is a lightweight feed reader inspired by [newsboat](https://newsboat.org) and
[yarnc](https://git.mills.io/yarnsocial/yarn). skimmer is very minimal and lacks features.
That is skimmer's best feature. skimmer tries to do two things well.
skimmer is a lightweight feed reader inspired by [newsboat](https://newsboat.org) and [yarnc](https://git.mills.io/yarnsocial/yarn). skimmer is very minimal and lacks features. That is skimmer's best feature. skimmer tries to do two things well.

- fetch a list of URLs and download their items to an SQLite3 database
- Read a list of URLs and fetch the items and saving them to an SQLite 3 database
- Display the contents of the SQLite3 database in reverse chronological order

That's it. No elaborate UI beyond what is easily accomplished using standard input,
standard output and standard err.
That's it. That is skimmer secret power. It does only two things. There is no elaborate user interface beyond standard input, standard output and standard error found on POSIX type operating systems.

skimmer needs to know what feeds to download and display. That is done by
reading either a newsboat style url file or and [OPML](http://opml.org/) file.
These are read and stored in an SQLite 3 database with the same base name of the file read
but with a file extension of `.skim`. This allows you to easily maintain separate
list of feeds to skim and potentially re-use the feed output.
skimmer needs to know what feed items to download and display. This done by providing a newsboat style URLs file. The feeds are read and the channel and item information is stored in an SQLite3 database of a similarly named file but with the `.skim` extension. When you want to read the downloaded items you invoke skimmer again with the `.skim` file. This allows you to easily maintain separate list of feeds to skim and potentially re-use the feed output.

Presently skimmer is focused on reading RSS 2, Atom and JSONfeeds. If this
experiment evolves further than I hope to add support for txtxt as well as
support for reading feeds from Gopher, Gemini and SFTP sites.
Presently skimmer is focused on reading RSS 2, Atom and jsonfeeds.

# SYNOSIS

# SYNOPSIS

~~~
skimmer [OPTIONS] FILENAE [TIME_RANGE]
skimmer [OPTIONS] URL_LIST_FILENAME
skimmer [OPTIONS] SKIMMER_DB_FILENAME [TIME_RANGE]
~~~

skimmer have two ways to invoke it. You can fetch the contents from list of URLs in newsboat urls file format. You can read the items from the related skimmer database.

## OPTIONS

-help
Expand All @@ -38,9 +33,6 @@ skimmer [OPTIONS] FILENAE [TIME_RANGE]
-version
: display version number and build hash

-fetch
: Download items from the list of URLs

-limit N
: Limit the display the N most recent items

Expand All @@ -53,50 +45,35 @@ removed. Otherwise time can be specified as a date in YYYY-MM-DD format or times
YYYY-MM-DD HH:MM:SS format.

-i, -interactive
: display an item and prompt for next action. e.g. (n)ext, (p)rev, (s)ave, (/)search, (d)elete
: display an item and prompt for next action. e.g. (n)ext, (s)ave, (t)ag, (q)uit. If you press enter the next item will be displayed without marking changing the items state (e.g. marking it read). If you press "n" the item will be marked as read before displaying the next item. If you press "s" the item will be tagged as saved and next item will be displayed. If you press "t" you can tag the items. Tagged items are treated as save but the next item is not fetched. Pressing "q" will quit interactive mode without changing the last items state.


# Examples

Fetch and read my newsboat feeds from `.newsboat/urls`. This will create a `.newsboat/urls.skim`.
Fetch and read my newsboat feeds from `.newsboat/urls`. This will create a `.newsboat/urls.skim`
if it doesn't exist. Remember invoking skimmer with a URLs file will retrieve feeds and their contents and invoking skimmer with the skimmer database file will let you read them.

~~~shell
skimmer .newsboat/urls
skimmer .newsboat/urls.skim
~~~

Fetch and read the feeds from `my-news.opml`. This will create a `my-news.skim` file.

~~~shell
skimmer my-news.opml
~~~

Get the latest items for the skimmer file "my-news.skim"
Download some news to read later
This will fetch and read the feeds from`my-news.urls`. This will create a `my-news.skim` file.
When the skimmer database is read a simplistic interactive mode is presented.

~~~shell
skimmer -fetch my-news.skim
skimmer my-news.urls
skimmer -i my-news.skim
~~~

Read the last downloaded content from `my-news.skim`

Display the downloaded news

~~~shell
skimmer my-news.skim
~~~

Limit the number of items sent to the screen.

~~~shell
skimmer -display -limit 25 my-news.skim
~~~
The same method is used to update your `my-news.skim` file and read it.

Or my favorite is to run the output through Pandoc
and page with less.
Export the current state of the skimmer database channels to a urls file. Feeds that failed
to be retrieved will not be in the database channels table channels table. This is an
easy way to get rid of the cruft and dead feeds.

~~~shell
skimmer -display -limit 25 my-news.skim | \
pandoc -f markdown -t plain | \
less -R
skimmer -urls my-news.skim >my-news.urls
~~~

Prune the items in the database older than today.
Expand All @@ -121,8 +98,8 @@ skimmer -prune my-news.skim \

### Requirements

skimmer is an experimental. The precompiled binaries are not necessarily tested.
To compile from source you need to have git, make, Pandoc SQLite3 and Go.
skimmer is an experimental. The compiled binaries are not necessarily tested.
To compile from source you need to have git, make, Pandoc, SQLite3 and Go.

- Git >= 2
- Make >= 3.8 (GNU Make)
Expand Down
1 change: 1 addition & 0 deletions TODO.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">Install</a></li>
<li><a href="search.html">Project Search</a></li>
<li><a href="ideas.html">Someday, Maybe</a></li>
<li><a href="https://github.com/rsdoiel/stngo">GitHub</a></li>
<li><a href="about.html">About</a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">Install</a></li>
<li><a href="search.html">Project Search</a></li>
<li><a href="ideas.html">Someday, Maybe</a></li>
<li><a href="https://github.com/rsdoiel/stngo">GitHub</a></li>
<li><a href="about.html">About</a></li>
</ul>
Expand Down
11 changes: 7 additions & 4 deletions about.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors:
orcid: "https://orcid.org/0000-0003-0900-6903"

repository-code: "git+https://github.com/rsdoiel/skimmer"
version: 0.0.3
version: 0.0.4
license-url: "https://spdx.org/licenses/MIT"


Expand All @@ -19,7 +19,7 @@ license-url: "https://spdx.org/licenses/MIT"
About this software
===================

## skimmer 0.0.3
## skimmer 0.0.4

### Authors

Expand All @@ -40,12 +40,15 @@ No no frills feed reader. Inspired by newsboat and yarnc, based on the gofeed pa

### Operating Systems

- POSIX
- Windows
- macOS
- Linux
- Raspberry Pi OS

### Software Requirements

- Git &gt;= 2.3
- GNU Make &gt;= 3.8
- Pandoc &gt;= 3.1
- Go &gt;= 1.21.1
- SQLite3 &gt;= 3.43
- Go &gt;= 1.21.1
32 changes: 13 additions & 19 deletions cmd/skimmer/skimmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,9 @@ The output format uses Pandoc's style of markdown markup.
-version
: display version and release hash
-fetch
: download the latest feed content
-limit N
: display the N most recent items.
-prune
: The deletes items from the items table for the skimmer file provided. If a time range is provided
then the items in the time range will be deleted. If a single time is provided everything older than
Expand All @@ -85,20 +81,22 @@ all items older then the current time would be removed. Otherwise time can be sp
in YYYY-MM-DD format or timestamp YYYY-MM-DD HH:MM:SS format.
-i, -interactive
: display an item and prompt for next action. e.g. (n)ext, (r)read, (s)ave, (l)abel, (q)uit
: display an item and prompt for next action. e.g. (n)ext, (s)ave, (t)ag, (q)uit. If you press
enter the next item will be displayed without marking changing the items state (e.g. marking it
read). If you press "n" the item will be marked as read before displaying the next item. If you
press "s" the item will be tagged as saved and next item will be displayed. If you press "t" you
can tag the items. Tagged items are treated as save but the next item is not fetched.
Pressing "q" will quit interactive mode without changing the last items state.
-urls
: Output the contents of the SQLite 3 database channels table as a newsboat URLs list
-opml
: Output the contents of the SQLite 3 database channels table as an OPML file.
: Output the contents of the SQLite 3 database channels table as a newsboat style URLs list
# EXAMPLE
Create a "my-news.skim" database from "my-news.opml".
Create a "my-news.skim" database from "my-news.urls".
~~~
{app_name] my-news.opml
{app_name] my-news.urls
~~~
Now that my-news.skim exists we can read it with
Expand All @@ -107,14 +105,14 @@ Now that my-news.skim exists we can read it with
{app_name} my-news.skim
~~~
Update and read the my-news.skim file.
Update and read the my-news.skim file by first using the urls file then using the
`+"`"+`.skim`+"`"+` file.
~~~
skimmer -fetch my-news.skim
skimmer my-news.urls
skimmer my-news.skim
~~~
{app_name} can prune it's own database and also limit the count of items displayed.
In this example we're pruning all the items older than today and displaying the recent
five items.
Expand Down Expand Up @@ -143,18 +141,16 @@ free software to the planet. - RSD, 2023-10-07
func main() {
appName := path.Base(os.Args[0])
showHelp, showVersion, showLicense := false, false, false
fetch, interactive, urls, opml := false, false, false, false
interactive, urls := false, false
prune, limit := false, 0
flag.BoolVar(&showHelp, "help", showHelp, "display help")
flag.BoolVar(&showVersion, "version", showVersion, "display version")
flag.BoolVar(&showLicense, "license", showLicense, "display license")
flag.BoolVar(&fetch, "fetch", fetch, "import feed content into database")
flag.BoolVar(&interactive, "i", interactive, "interactively display items one at a time in reverse chronologically order")
flag.BoolVar(&interactive, "interactive", interactive, "interactively display items one at a time in reverse chronologically order")
flag.BoolVar(&prune, "prune", prune, "remove items in the skimmer file for the time range provided")
flag.IntVar(&limit, "limit", limit, "limit the number of items output")
flag.BoolVar(&urls, "urls", urls, "output the substribed feeds in newsboat's urls file format.")
flag.BoolVar(&opml, "opml", opml, "output the substribed feeds in OPML format.")
flag.Parse()

args := flag.Args()
Expand Down Expand Up @@ -184,11 +180,9 @@ func main() {
os.Exit(1)
}
// Setup our options
app.Fetch = fetch
app.Limit = limit
app.Prune = prune
app.Interactive = interactive
app.AsOPML = opml
app.AsURLs = urls
if err := app.Run(in, out, eout, args); err != nil {
fmt.Fprintf(eout, "%s\n", err)
Expand Down
13 changes: 8 additions & 5 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,28 @@
"license": "https://spdx.org/licenses/MIT",
"codeRepository": "git+https://github.com/rsdoiel/skimmer",
"dateCreated": "2023-10-06",
"dateReleased": "2023-10-06",
"dateReleased": "2023-10-10",
"issueTracker": "https://github.com/rsdoiel/skimmer/issues",
"name": "skimmer",
"version": "0.0.3",
"version": "0.0.4",
"description": "No no frills feed reader. Inspired by newsboat and yarnc, based on the gofeed package by mmcdole on GitHub.",
"releaseNotes": "Proof of concept.",
"developmentStatus": "concept",
"programmingLanguage": [
"go"
],
"operatingSystem": [
"POSIX"
"Windows",
"macOS",
"Linux",
"Raspberry Pi OS"
],
"softwareRequirements": [
"Git >= 2.3",
"GNU Make >= 3.8",
"Pandoc >= 3.1",
"Go >= 1.21.1",
"SQLite3 >= 3.43"
"SQLite3 >= 3.43",
"Go >= 1.21.1"
],
"relatedLink": [
"https://github.com/mmcdole/gofeed",
Expand Down
Loading

0 comments on commit 3adbe30

Please sign in to comment.