Skip to content

Daily and Weekly intern log using python misc libraries

Notifications You must be signed in to change notification settings

fyezool/intern_log

Repository files navigation

Daily & Weekly Log for UCTS internship

This Project Basically :-

  1. Automate the logbook using pdf, reportlab, pypdf2
  2. Honing Python skill for Nton Smart Inventory project
  3. Utilize free time during Movement Control Order (MCO) happening in Malaysia
  4. Inspired by a classmate's post on automation, hence, tried myself for the sake of curiosity

Pre-requisites

  1. Main program requires following modules to run: pypdf2, reportlab
  2. Miner requires pdfminer modules to run

Use It for the Sake of Automation(Fancy Word for Lazy)

  1. Run daily_log.py
  2. Enter day, date, activities, work produced, comments on the activities and give name for your file.
  3. Produced logs will be on logs folder.
  4. Print that thing.

How Does It Works

  1. Pdf file daily and weekly scraped using miner_daily and miner_weekly to get the position of textfield instead of blind guess
  2. Modify the coordinate a bit just to make sure it is accurate
  3. daily_log.py then will copy all daily.pdf content then insert all input data from user then create new file according to the user

Achieving Text Wrapping

  1. Use if to decide max length for a line of text
  2. Use Python's textwrap method textwrap.wrap(content, width=80, break_on_hyphens=False) and store it as a new list
  3. Display stored text using for loop, for each line of text being displayed with y-coordinate offsets
  4. Profit
  5. Best of luck on your internship guys.

References

  1. Main code
  2. Pdf scraping 101
  3. Another pdf scraping
  4. Text wrapping

TODO

  • Fetch file from specific folder then use cron to execute python script
  • Modularise the program
  • You tell?

About

Daily and Weekly intern log using python misc libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages