... | ... | @@ -30,7 +30,7 @@ License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. T |
|
|
|
|
|
_pharc_ takes for granted that you have a link in your `$HOME` to the gopher server. Or more exactly, to`$HOME/gopher/phlog`. Even if this might seem a little bit strange at first, it makes a lot of sense (you do not need to become root to use it). Even though in certain use cases this could be seen as a limitation, the path `$HOME/gopher/phlog` will still be the default.
|
|
|
|
|
|
**Workaround:** You can _export_ `PHARC_WORKDIR=` specifying the path to your phlog. Be aware that you need write permissions to that directory. One example could be:
|
|
|
**Workaround:** You can _export_ `PHARC_WORKDIR=` specifying the path to your phlog. Be aware that you need write permissions in that directory. One example could be:
|
|
|
|
|
|
$ export PHARC_WORKDIR="$HOME/phlog"
|
|
|
$ pharc
|
... | ... | @@ -90,6 +90,8 @@ First, list all the unarchived posts using the **-l** option: |
|
|
Once you know which year or years you want to archive, use the **-a** option. For example:
|
|
|
|
|
|
$ pharc -a 2010 2011 2012
|
|
|
|
|
|
If you want to archive all unarchived years at once you can use the **-A** option.
|
|
|
|
|
|
**What if things go wrong?**
|
|
|
|
... | ... | @@ -99,7 +101,7 @@ Before creating the archive, _pharc_ performs several tests to see if the script |
|
|
|
|
|
**What if I discover `pharc` too late and I already have posts from several different years?**
|
|
|
|
|
|
Well, if you use _pharc_ v.3.0 or lower, it will only archive the current year's posts and you will have to manually archive the rest of the years. _pharc3_ includes the `-a|--archive` option to specify the year of the archive. But be warned, this option is merely redundant in version 3.0, means, that you can only specify the current year.
|
|
|
Well, if you use _pharc_ v.3.0 or lower, it will only archive the current year's posts and you will have to manually archive the rest of the years. _pharc3_ includes the `-a|--archive` option to specify the year of the archive. But be warned, this option is merely redundant in version 3.0, means, that you can only specify the current year.
|
|
|
|
|
|
_pharc4_ allows you to specify the year or years of the archive. Imagine that you have scattered posts from 2012, 2013 and 2014. If you type _pharc_ without any options it will archive the default current year 2014. But if you specify, for example:
|
|
|
|
... | ... | @@ -111,6 +113,8 @@ or |
|
|
|
|
|
It will archive those years too **\o/**. The `-l|--list` option might prove really handy to list all the unarchived posts before actually archiving them.
|
|
|
|
|
|
_pharc5_ allows you to archive all unarchived posts at once by means of the **-A** option.
|
|
|
|
|
|
**What is the difference between pharcX and pharc v.X.0?**
|
|
|
|
|
|
In a way, _pharcX_ is the development version, used for testing purposes. And _pharc v.X.0_ is the final release.
|
... | ... | @@ -126,6 +130,8 @@ _pharc3_ was released in 2013 as _pharc_ v.3.0. It included several enhancements |
|
|
|
|
|
_pharc4_ was released in June 2014 as _pharc_ v.4.0. It includes many new options. See the changelog for details.
|
|
|
|
|
|
_pharc5_ was released in September 2015 as _pharc_ v.5.0. It includes one new option. See the changelog for details.
|
|
|
|
|
|
**How can I install _pharc_?**
|
|
|
|
|
|
If you want to install the raw script, make it executable `$ chmod +x pharc`and copy it in your $PATH. `/usr/local/bin` is a nice place. Then, from a terminal, call the script by simply typing `pharc` with the options you want. Try: _pharc -h_.
|
... | ... | @@ -163,3 +169,49 @@ but when testing the script I use **set -x**. And it is easier for me to follow |
|
|
**Why sh instead of say ksh, bash, zsh...whatever?**
|
|
|
|
|
|
_pharc_ was originally written with the _ksh_ in mind but was tested on both _ksh_ and _bash_. Eventually, the she-bang was changed to `#!/bin/sh` to make the script more portable. But to tell you the truth, I do not care much about the shell as long as it is POSIX compliant.
|
|
|
|
|
|
**Is pharc still actively developed?**
|
|
|
|
|
|
_pharc_ has now all the features and options I envisioned through all these years of development. From now on I only intend to make bug fixes and minor cosmetic details.
|
|
|
|
|
|
**Thanks for using pharc!**
|
|
|
|
|
|
**CHANGELOG**
|
|
|
|
|
|
pharc (5.0-1)
|
|
|
|
|
|
* v.5.0
|
|
|
|
|
|
* Add '-A|--all' option to archive all years at once.
|
|
|
|
|
|
* v.4.0
|
|
|
|
|
|
* Changed shebang to #!/bin/sh to make script more portable.
|
|
|
* Improved if[...]else statements to make script more robust.
|
|
|
* Added functionality to choose year of archive.
|
|
|
* Added functionality to specify several years in one go.
|
|
|
* Added '-l|--list' option to list unarchived phlog posts.
|
|
|
* Logging by default to "$HOME/pharc.log"
|
|
|
* Split code into functions.
|
|
|
* Added option '-d|--delete to delete the log file.
|
|
|
|
|
|
* v.3.0
|
|
|
|
|
|
* Added option -a to specify year of archive (Redundant).
|
|
|
* Added -v (version information option).
|
|
|
* Added -h (help menu).
|
|
|
* Added -y (year of the archive).
|
|
|
* Help function (usage).
|
|
|
* Improve coding style.
|
|
|
* Leave a backup of gophermap -> gophermap~ (in case things break).
|
|
|
* Test before echoing "You're done now. Thanks for using pharc."
|
|
|
|
|
|
* v.2.0
|
|
|
|
|
|
* Updating for mkphlog v.0.2
|
|
|
* Adding version number 2.0
|
|
|
* Adding license (2012)
|
|
|
|
|
|
* Initial release.
|
|
|
|
|
|
|