Servant application (server) in Erlang.
Servant application semiautomates this workflow:
User has many archives (rar, zip) in single folder (its manga for me)
Periodically some archives:
- unzipped to subfolder with same name
- complemented
- archived back in subfolder
- replaced old archive with new
Servant server can detect and after user confirmation do this task:
- subfolder need archivation: contains files and folders, but no archives; currently using winrar for archivation
- subfolder only contains archive (with same name), thus archive can be moved to parent folder
- subfolder is empty and can be deleted
Second component [ServantTray] (https://github.com/EPashkin/ServantTray) is responsible for the interaction with the user. He receives list of confirmation from server and showing it in content menu of tray icon. After user click menu item, ServantTray sends confirmation to server.
Servant requires Erlang/OTP, [git] 2 and rebar.
To get source via git from this repository.
git clone https://github.com/EPashkin/servant.git
To get all dependencies, go to the servant directory and type:
rebar get-deps
or on Windows
escript rebar get-deps
And to build meck and other dependencies:
rebar compile
or on Windows
escript rebar compile
a) To configure server, edit src/servant.app.src
in this part:
{env, [
{timeout, 10000}, %delay beetwen checks
{tasks, [
{"D:/_Manga/1", [ %path to checked directory
check_save_arched, %checks
check_archivation,
check_remove_empty_dir,
check_recheck_confirmations
]}
]}
]}
Hint: dirs use unix delimeter '/'.
b) To build Servant and run tests, go to the servant directory and type:
rebar compile eunit skip_deps=true
Two things might seem alarming when running the tests:
- Warnings emitted by cover
- En exception printed by SASL
Both are expected due to the way Erlang currently prints errors. The
important line you should look for is
All XX tests passed
, if that appears all is correct.
c) To generate release:
rebar generate
On Windows
d) To start server in console:
rel\servant_node\bin\servant_node.cmd console
e) To start server as service, type in Elevated Command Prompt (Runned as Administrator):
servant_node.cmd install
servant_node.cmd start
Patches are greatly appreciated! For a much nicer history, please
write good commit messages. Use a branch name prefixed by
feature/
(e.g. feature/my_example_branch
) for easier integration
when developing new features or fixes for servant.
Should you find yourself using Servant and have issues, comments or feedback please create an issue here on GitHub.
Contributors:
none now