Giter Site home page Giter Site logo

ftgenerator's Introduction

Fake Timesheet Generator

Ever found yourself forgetting to fill out timesheets for months on end? You're not alone! That's why I, a self-confessed lazy developer, created this nifty little script. The timesheet.py generates random fake work schedules and timesheets for a given month, including Excel and PDF exports, based on user-defined parameters.

Warning

This script produces entirely fake data based on the variables you set. Depending on how these documents are used, the recipient may consider them false, invalid, or even fraudulent. Use it wisely and with caution!

For my purposes, this script is a lifesaver, helping me keep up with paperwork I otherwise can't be bothered to do. It’s tailored to suit my needs perfectly, and it is completely legitimate for my own use. If you're mature enough to understand the implications, feel free to adapt it for your own purposes. Just remember: with great laziness comes great responsibility!

How It Works

When you run the script, you'll be prompted to enter several parameters: the year and month for which you want to generate the timesheet, the minimum and maximum number of workdays, the earliest start time and latest end time for work daily hours, and the minimum and maximum total hours for the month. Based on these inputs, the script randomly selects workdays within the specified range, ensuring they do not fall on holidays or weekends. It then generates random start and end times for each workday within the provided time window, ensuring that the total hours worked fall within the specified limits. The generated data is then compiled into detailed timesheets, which are saved in CSV and Excel formats, with an option to include a digital signature and export the document as a PDF.

Features

  • Random Work Schedule Generation
    Because who needs real schedules? Generates random work schedules for any given month, ensuring your fake work times look varied and oh-so realistic.
  • CSV, Excel, and PDF Exports
    Creates detailed timesheets in CSV and Excel formats, with a fancy PDF export for easy sharing and pretending. Impress your friends and colleagues with beautifully organized fake data.
  • Customizable Parameters
    Lets you play god with your work hours: define the number of workdays, start and end times, and total working hours. Flexibility is key when you're making stuff up!
  • German Holidays Consideration
    Because even fake employees need their holidays! Automatically skips German public holidays and special days (like Christmas Eve and New Year's Eve) to keep your schedule "realistic."
  • Signature Support
    Add a personal touch with your very own signature and a snazzy image of it in the Excel timesheets. The image is scaled to fit perfectly, maintaining your artistic integrity.
  • Error Handling and Retry Mechanism
    No more infinite loops! Ensures valid timesheet generation with multiple retries in case your made-up hours don’t quite add up. It's like having a built-in sanity check for your fakery.
  • User-Friendly Prompts
    Interactive prompts guide even the laziest user through the setup process. Customizing your fake timesheets has never been easier!
  • Directory Management
    Automatically creates and organizes output files in neatly named directories, because even our laziness has standards.
  • Existing File Check
    Prevents accidental overwriting of your precious fake data. Gives you the option to back up or overwrite existing files – because nobody wants to lose their masterpiece.
  • Bulk Processing Option
    Got a whole year to fake? No problem! Supports bulk processing to generate timesheets for all months in one go. More fakery, less effort.
  • Data Preview
    Preview your brilliantly concocted timesheet data in the terminal before committing to it. Verify and tweak your fake schedules to perfection.

Requirements

  • Python 3.6 or higher
    • openpyxl
    • holidays
    • pypiwin32 (for Windows PDF conversion)

Installation

  1. Clone the repository:
git clone https://github.com/ot2i7ba/FTGenerator.git
cd FTGenerator
  1. Install the required dependencies:
pip install -r requirements.txt

Usage

Run the script using Python:

python timesheet.py

Configuration

Follow the on-screen prompts to configure your desired parameters:

  • Bulk Processing
    Option to generate timesheets for all months of a year.
  • Year
    The year for which the timesheet is generated.
  • Month
    The month for which the timesheet is generated (only if bulk processing is not selected).
  • Minimum and Maximum Workdays
    Define the range of working days in the month.
  • Start and End Times
    Specify the earliest start time and latest end time for work hours.
  • Minimum and Maximum Total Hours
    Set the range for the total working hours in the month.
  • Signature
    Enter a name for the signature and optionally choose an image file for the signature.
  • Preview
    Option to preview the generated schedule in the terminal.

Example

python timesheet.py

Sample Prompts:

Do you want to perform bulk processing? (yes/no) [no]:
Enter the year [2024]:
Enter the month (1-12) [7]:
Enter the maximum workdays in the month [8]:
Enter the minimum workdays in the month [6]:
Enter the earliest start time (HH:MM) [17:00]:
Enter the latest end time (HH:MM) [22:00]:
Enter the maximum total hours in the month [17]:
Enter the minimum total hours in the month [15]:
Enter the name for the signature:
The following PNG files were found:
1. signature1.png
2. signature2.png
Enter the number of the image to use for the signature (1-2), or press Enter to skip:

Output

The generated timesheets will be saved in a directory named Stundenzettel {year}, with files in CSV, Excel, and PDF formats.

File Structure

  • CSV File
    Contains the dates, start times, end times, and total hours for each workday.
  • Excel File
    Includes formatted timesheet with headers, total hours, and optional signature.
  • PDF File
    PDF version of the Excel timesheet for easy sharing and printing.

Signature and Image

  • Signature Name
    The name entered for the signature will be added to the generated Excel timesheet.
  • Signature Image
    Optionally, you can add an image of your signature to the timesheet.
    • The image must be in PNG format.
    • It is recommended to use an image with good dimensions for better clarity. For example, a signature image of 215x80 pixels works well.
    • The script will attempt to scale the image to fit within the cell, keeping the aspect ratio intact. However, it is best to use an image with appropriate dimensions to avoid excessive scaling and maintain legibility.

Screenshot 1

Fake Timesheet Generator


License

This project is licensed under the MIT license, providing users with flexibility and freedom to use and modify the software according to their needs.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for review.

Disclaimer

This project is provided without warranties. Users are advised to review the accompanying license for more information on the terms of use and limitations of liability.

Conclusion

Let's be honest: I'm way too lazy to fill out timesheets regularly. I mean, I've been known to forget them for months, sometimes even years! Instead of torturing myself with manually creating Excel tables and saving them as PDFs, I built this nifty little helper. It's customized to my needs, which is why the generated files are in German.

Full disclosure: I'm not a professional programmer. I'm just a lazy, forgetful, and somewhat scatterbrained guy who hates paperwork. So, if you find any bugs or glitches, feel free to laugh, cry, or let me know. And don't be surprised if you see this README.md changing frequently—I keep having to fix and update it because, well, I'm me.

But seriously, if you're as forgetful (or lazy) as I am, this script might just save your day (and your sanity)!

Footnotes

  1. The signature on the screenshot was made with the font Photograph Signature by Yadhie Setiawan.

ftgenerator's People

Contributors

ot2i7ba avatar

Stargazers

Shooty avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.