Skip to content

keygenqt/MyLibrary-server

Repository files navigation

MyLibrary

MyLibrary is an application for cataloging your books library. The application is designed to help unite lovers of literature. Find a rare book among users MyLibrary.

It's server part - Cement

  • server data backup
  • cleaning up obsolete files and data
  • sending firebase push messages

Get it from the Snap Store

Backup db

mylibrary backup -t=db

Back up the database. You can specify a folder or ftp in the configuration file.

Backup folder/dirs

mylibrary backup -t=tar

Back up the files or dirs in tar.gz. For compression use pigz (& tar) with multi-stream archive build capability.

Clear db data

mylibrary cleaner -t=tokens

Clearing obsolete tokens from the database. Application specific.

# find method in the project for change
def clear_old(cls, app):

Clear db images relations

mylibrary cleaner -t=images

Clearing non-database images in the folder specified in the configuration file.

Sending messages push firebase

mylibrary notification

Messaging google push firebase. Application specific. You need to build a request for a specific database.

# find method in the project for change
def find_open(cls, app):

Create reminder notification

# 15 days
mylibrary reminder -d=15

# 25 days
mylibrary reminder -d=25

Create reminder notification for 15 day and 25 day if user not open application. Application specific.

# find Controller in the project for change
class Reminder(Controller):

Cron configuration example

0 1 * * *   /snap/bin/mylibrary backup -t=db
0 1 * * *   /snap/bin/mylibrary backup -t=tar
0 1 * * *   /snap/bin/mylibrary cleaner -t=tokens
0 1 * * *   /snap/bin/mylibrary cleaner -t=images
0 1 * * *   /snap/bin/mylibrary reminder -d=15
0 1 * * *   /snap/bin/mylibrary reminder -d=25
*/5 * * * * /snap/bin/mylibrary notification

About

MyLibrary is an application for cataloging your books library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages