Git Product home page Git Product logo

seanpm2001 / hyperslice Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 4.49 MB

✂️⚡️🔪️💾️ HyperSlice is an AI powered tool for rapidly cutting elements out of digital media, and saving them to various output files.

Home Page: https://github.com/seanpm2001/HyperSlice_Docs/

License: GNU General Public License v3.0

HTML 0.25% Julia 99.75%
ai ai-2001 ai2001 artificial-intelligence export export-tool julia julia-lang julia-language hyperslice

hyperslice's Introduction


Click/tap here to expand/collapse the project logo

HyperSlice logo

Click/tap here to expand/collapse this article

HyperSlice

Click/tap here to expand/collapse the title/lead section

✂️⚡️🔪️💾️ HyperSlice is an AI powered tool for rapidly cutting elements out of digital media, and saving them to various output files.


Targets

Click/tap here to expand/collapse the targets section

The logo of HyperSlice gives a basic example of functionality. HyperSlice can snip out different parts of the image and place them in separate files. The first challenge is to fix the HyperSlice logo using only HyperSlice.

A better example is webpages. HyperSlice can read document source code, and can snip out only content placed in specific tags (such as <div> <header> <article> <li> and more) it can do this either by reading the source code, or selecting content it sees as being in its own section. It can also do this multiple times at once throughout the page, and saving them to output files.

This functionality also applies to images and videos, but not audio. Videos can be sliced through recorded playback of up to 24 hours, although processing time and needed RAM multiplies with every second, which is something to keep in mind.


Technical

Click/tap here to expand/collapse the technical section

This project is written in Julia, and relies on the :octocat: AI2001 framework although it is not directly a part of the AI2001 project.


.hypslyce

Click/tap here to expand/collapse the .hypslyce section

A hypslyce file is a project file containing instructions for snipping/slicing and output. It is an XML file.

Here is an example of a simple .hypslyce file that grabs all <div> HTML elements and exports it into an SVG image:

<?xml version="1.0" encoding="UTF-8"?>
<hyperslice>
	<hypersnip>
		<systemType="UNIX-like"></systemType>
		<file="///bob/home/Desktop/HyperSlice-Demo/Input/Test.htm">
			<target="<div>" && "</div>"></target>
			<action="Snip"></action>
			<mode="image/svg"></mode>
			<range="l1" && "l999"></range> <!-- The first 999 lines of the file !-->
			<exportTo="///bob/home/Desktop/HyperSlice-Demo/Output/DIV.svg">
			<overWrite="False"></overWrite>
		</file>
	</hypersnip>
</hyperslice>

When overWrite is set to False, any additional images that are generated are placed in a separate file in the target folder with the same name, with a number appended to it.

In this example, Bob is the username, and the system is UNIX-like. An HTML file is the input, where its first 999 lines are read, and all <div> elements are sent to a file called DIV.svg if more than 1 <div> element is selected, additional output files will go like DIV-1.svg DIV-2.svg and so on.


Alternative name

Click/tap here to expand/collapse the alternative name section

The secondary name for this project is HyperSnip, which is intended to be used for small snippets.


Additional-documentation

Click/tap here to expand/collapse the additional documentation section

Additional documentation is located :octocat: in a separate repository


Original draft

Click/tap here to expand/collapse the original draft section

HyperSlice

AI powered tool to cut various elements out of an image, and save them to various files (such as: each <div> detected in a screenshot) give it other targets via a .hypslyce file with instructions.

File info

Click/tap here to expand/collapse the file info section

File type: Markdown (*.md *.mkd *.mdown *.markdown)

File version: 2 (2023, Wednesday, July 5th at 01:26 pm PST)

Line count (including blank lines and compiler line): 213

Word count: 1,161

Character count (including spaces): 7,666

Character count (excluding spaces): 6,542

Size (in bytes): 7,684

Current article language: English (EN_USA) / Markdown (CommonMark) / HTML5 (HyperText Markup Language 5.3)

Encoding: UTF-8 (Emoji 12.0 or higher recommended)

All times are UTC-7 (PDT/Pacific Time) (Please also account for DST (Daylight Savings Time) for older/newer entries up until it is abolished/no longer followed)

Note On 2022, Sunday, March 13th at 2:00 am PST, the time jumped ahead 1 hour to 3:00 am.

Note You may need special rendering support for the <details> HTML tag being used in this document


File history

Click/tap here to expand/collapse the file history section

Version 1 (2023, Monday, July 3rd at 11:20 pm PST)

Click/tap here to expand/collapse the file history entry for version 1 section

Changes

  • Started the file
  • Added the title section
  • Referenced the project logo
  • Added the Targets section
  • Added the Technical section
  • Added the .hypslyce section
  • Added the Alternative name section
  • Added the Additonal documentation section
  • Added the Original draft section
  • Added the File info section
  • Added the Footer section
  • No other changes in version 1

Version 2 (2023, Wednesday, July 5th at 01:26 pm PST)

Click/tap here to expand/collapse the file history entry for version 2 section

Note This release was delayed by 1 day due to time issues.

Changes

  • Converted all sections into dropdown sections
  • Updated the .hypslyce section to include an example
  • Updated the Additional documentation section to fix a typo
  • Updated the Technical section to clarify that this is not part of the AI2001 project
  • Updated the File info section
  • Added the File history section
    • Added an entry for version 1
    • Added an entry for version 2
  • No other changes in version 2

Footer

Click/tap here to expand/collapse the footer

You have reached the end of this page.

EOF

hyperslice's People

Contributors

seanpm2001 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

seanwallawalla

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.