Code Monkey home page Code Monkey logo

pureref-format's Introduction

PureRef-format

A Python script to automatically generate organised PureRef (1.10/1.11.1) .pur files from folders of images, and a module you can use to convert .pur files to/from any other file format.

Video

Watch the video

Usage

You will need to install Python if you don't have it already (I use 3.8.10), be sure to enable the option to add it to your PATH during installation (for Windows users).
Navigate to the PureRef-format folder, and in a command prompt type: python pureref_gen_script.py
Without arguments, this will create new folders called "Artists" and "Purs", add folders with images to the "Artists" folder and run the script again.
For each image folder in the "Artists" folder, an organised .pur file containing these images will be created in the "Purs" folder.
Example:

Artists/
    Artist1/
        Image1.jpg
        Image2.jpg
        Image3.png
    Artist2/
        Image1.jpg
        Image2.jpeg
        Image3.jpeg
Purs/
    Artist1.pur
    Artist2.pur

You may also pass arguments to specify the input folder and output folder, for example python pureref_gen_script.py input output

If your input folder does not have subfolders with images, the script will try to use images in the input folder directly.
Already existing .pur files will be skipped, so delete them if you want to regenerate them. Empty files will not be generated.

Content

pureref_gen_script.py script to convert all folders (default Artists/) to .pur files (default Purs/)
pureref_gen.py module with a function to generate an organised PureRef .pur file from a folder of images
purformat.py module with a reader and writer for PureRef files, can be used to write your own converter

About

I was inspired to create this after making an Artstation webscraper: https://github.com/FyorUU/Artstation-webscraper
Because I like collecting huge amounts of reference which I wanted to save time on, and wondered if the next step (putting the images in PureRef files) could be automated too.

pureref-format's People

Contributors

fyordev avatar irmitya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pureref-format's Issues

External Images

I was finding out how to export images, and after getting an image "extracted", I wanted to know how duplicate filenames would be handled and nested folders.
So, I opened a .pur file that's composed of images somewhere on my computer, and found that NONE of the images were loaded in the purformat.images list,

import PIL, io
PIL.Image.open(io.BytesIO(img.pngBinary)).save(fR"C:\purtoimage\{img.transforms[0].name}.png")

I use pureref as a notes/bookmarking tool, and wanted to use this to finally be able to automate it but without any usage of external images, I can only use it as an extractor.

Texts?

How do I deal with texts I/O?

I develop stories with chatGPT in a screenwriter add-on inside of Blender, but I easily get lost in all the directions the story can go, and I would like to arrange the story elements in an infinite canvas like pureref. If texts/notes are supported in your code, can you include how to deal with it I/O in your examples/documentation?

Adding a Licence

Hi @FyorUU,

This project looks great! Would you mind adding a licence?

Typing deprecated

Apparently from typing import List isn't how we do things anymore

Written pur Notes Don't Retain Parent/Link Connection

In Pureref, when you're selecting an image/note then you add a note, it will be attached to the selected item or the selected item's parent. Then when you move the item/parent, the not will always follow it, and if you delete the item, the note will be deleted too.

When you save (write) a pur file with PurFile, the locations/sizes will be retained but the texts will be disconnected from their original parent/link.

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.