Skip to content

Commit

Permalink
Version 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EasyG0ing1 committed Jun 7, 2024
1 parent f905c93 commit 151348f
Show file tree
Hide file tree
Showing 17 changed files with 346 additions and 187 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ right.

## Version History

* 2.2.0
* Added the `sb` option which allows a search of entire browser history
* Fixed problem when copying browser history for offline access
* Fixed date issues with different browsers
* Fixed safari schema problem with sqlite

* 2.1.0
* Added check for headless mode in Watch class

Expand Down
39 changes: 24 additions & 15 deletions build/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,38 @@ Click on your operating system to see how to set up the build environment:

## First

If you're in Windows:

```bash
mkdir C:\github
cd C:\github
```

Mac/Linux:

```bash
mkdir ~/github
cd ~/github
```

Clone the repository to your local drive:

```bash
git clone https://github.com/EasyG0ing1/iget.git
cd iget
```

### MacOS or Linux

```bash
cd ~/github/iget/build/maclinux
cd iget/build/maclinux
chmod +x *.sh
./buildjar.sh
```

### Windows

```bash
cd C:\github\iget\build\windows
cd iget\build\windows
buildjar.bat
```

Expand Down Expand Up @@ -92,12 +105,10 @@ You will then see it do things like updating `yt-dlp` ... give it some time.

The next thing you should see will look like this:

```bash
Watching Clipboard - Ctrl+C to exit
```
> Watching Clipboard - Ctrl+C to exit
And **THAT'S ALL YOU SHOULD SEE**. If you see a command prompt show up after that, then something went wrong. Open an
issue and lets talk about it.
issue and let's talk about it.

Launch your browser and go to instagram.com and log into your Instagram account. Next, find a reel. If clicking on reel
on the left side of the screen doesn't work for you, then just find a content creator and from their page, click on
Expand All @@ -106,17 +117,15 @@ Reels then click on one of their reels.
After you've clicked on a reel, the video should pop up in your browser and start playing. We want the text in the URL
field, so highlight all of that text, then RIGHT CLICK on it and select copy. The text should look something like this:

```azure
https://www.instagram.com/reel/C6RT4CKyl2O/
```
> `https://www.instagram.com/reel/C6RT4CKyl2O/`

Once you copy it to your clipboard, you should see in the terminal something like this:

```azure
Watching Clipboard - Ctrl+C to exit
Downloading: https://www.instagram.com/reel/C6RT4CKyl2O/?utm_source=ig_embed
Success: https://www.instagram.com/reel/C6RT4CKyl2O/?utm_source=ig_embed
```
> Watching Clipboard - Ctrl+C to exit
> Downloading: https://www.instagram.com/reel/C6RT4CKyl2O/?utm_source=ig_embed
> Success: https://www.instagram.com/reel/C6RT4CKyl2O/?utm_source=ig_embed

If the Downloading line doesn't show up right away for some reason, click on the Terminal window to make it active, then
click on the web browser to make it active and copy the text to the clipboard again.
Expand Down
Binary file added build/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions build/maclinux/graal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ rm -R $HOME/github/iget/graalvm
mkdir $HOME/github/iget/graalvm
java --enable-preview -agentlib:native-image-agent=config-output-dir=$HOME/github/iget/graalvm -jar $HOME/github/iget/target/iGet-jar-with-dependencies.jar setBrowser
java --enable-preview -agentlib:native-image-agent=config-merge-dir=$HOME/github/iget/graalvm -jar $HOME/github/iget/target/iGet-jar-with-dependencies.jar graal
java --enable-preview -agentlib:native-image-agent=config-merge-dir=$HOME/github/iget/graalvm -jar $HOME/github/iget/target/iGet-jar-with-dependencies.jar version
35 changes: 20 additions & 15 deletions build/maclinux/native.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
native-image \
-Djava.awt.headless=true \
--no-fallback \
--verbose \
--enable-preview \
--initialize-at-build-time=org.sqlite.util.ProcessRunner \
-cp "$HOME/.m2/repository/org/xerial/sqlite-jdbc/3.45.3.0/sqlite-jdbc-3.45.3.0.jar" \
-H:+ReportExceptionStackTraces \
-H:ReflectionConfigurationFiles=$HOME/github/iget/graalvm/reflect-config.json \
-H:JNIConfigurationFiles=$HOME/github/iget/graalvm/jni-config.json \
-H:ResourceConfigurationFiles=$HOME/github/iget/graalvm/resource-config.json \
-H:SerializationConfigurationFiles=$HOME/github/iget/graalvm/serialization-config.json \
-H:Name=$HOME/github/iget/target/iget \
-jar $HOME/github/iget/target/iGet-jar-with-dependencies.jar \
$HOME/github/iget/target/iget
#!/bin/bash

mvn -f $HOME/github/iget/pom.xml clean -Pnative native:compile


# native-image \
# -Djava.awt.headless=true \
# --no-fallback \
# --verbose \
# --enable-preview \
# --initialize-at-build-time=org.sqlite.util.ProcessRunner \
# -cp "$HOME/.m2/repository/org/xerial/sqlite-jdbc/3.45.3.0/sqlite-jdbc-3.45.3.0.jar" \
# -H:+ReportExceptionStackTraces \
# -H:ReflectionConfigurationFiles=$HOME/github/iget/graalvm/reflect-config.json \
# -H:JNIConfigurationFiles=$HOME/github/iget/graalvm/jni-config.json \
# -H:ResourceConfigurationFiles=$HOME/github/iget/graalvm/resource-config.json \
# -H:SerializationConfigurationFiles=$HOME/github/iget/graalvm/serialization-config.json \
# -H:Name=$HOME/github/iget/target/iget \
# -jar $HOME/github/iget/target/iGet-jar-with-dependencies.jar \
# $HOME/github/iget/target/iget
1 change: 1 addition & 0 deletions build/windows/graal.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ rd /s /q %APPDATA%\iGet
mkdir C:\github\iGet\graalvm
java --enable-preview -agentlib:native-image-agent=config-output-dir=C:\github\iGet\graalvm -jar C:\github\iGet\target\iGet-jar-with-dependencies.jar setBrowser
java --enable-preview -agentlib:native-image-agent=config-merge-dir=C:\github\iGet\graalvm -jar C:\github\iGet\target\iGet-jar-with-dependencies.jar graal
java --enable-preview -agentlib:native-image-agent=config-merge-dir=C:\github\iGet\graalvm -jar C:\github\iGet\target\iGet-jar-with-dependencies.jar version
6 changes: 4 additions & 2 deletions build/windows/native.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@echo off
cd C:\github\iGet
native-image --no-fallback --verbose --enable-preview --initialize-at-build-time=org.sqlite.util.ProcessRunner -cp "%HOMEPATH%\.m2\repository\org\xerial\sqlite-jdbc\3.45.3.0\sqlite-jdbc-3.45.3.0.jar" -H:ReflectionConfigurationFiles=C:\github\iGet\graalvm\reflect-config.json -H:JNIConfigurationFiles=C:\github\iGet\graalvm\jni-config.json -H:ResourceConfigurationFiles=C:\github\iGet\graalvm\resource-config.json -H:SerializationConfigurationFiles=C:\github\iGet\graalvm\serialization-config.json -H:+ReportExceptionStackTraces -jar C:\github\iGet\target\iGet-jar-with-dependencies.jar C:\github\iGet\target\iget

mvn -f C:\github\iget\pom.xml clean -Pnative native:compile

rem native-image --no-fallback --verbose --enable-preview --initialize-at-build-time=org.sqlite.util.ProcessRunner -cp "%HOMEPATH%\.m2\repository\org\xerial\sqlite-jdbc\3.45.3.0\sqlite-jdbc-3.45.3.0.jar" -H:ReflectionConfigurationFiles=C:\github\iGet\graalvm\reflect-config.json -H:JNIConfigurationFiles=C:\github\iGet\graalvm\jni-config.json -H:ResourceConfigurationFiles=C:\github\iGet\graalvm\resource-config.json -H:SerializationConfigurationFiles=C:\github\iGet\graalvm\serialization-config.json -H:+ReportExceptionStackTraces -jar C:\github\iGet\target\iGet-jar-with-dependencies.jar C:\github\iGet\target\iget
63 changes: 54 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.simtechdata</groupId>
<artifactId>iGet</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
<packaging>jar</packaging>

<name>iGet</name>
Expand All @@ -20,14 +20,12 @@
<maven-jar-plugin>3.4.1</maven-jar-plugin>
<maven-assembly-plugin>3.7.1</maven-assembly-plugin>
<maven-enforcer-plugin>3.4.1</maven-enforcer-plugin>
<maven-antrun-plugin>3.1.0</maven-antrun-plugin>
<exec-maven-plugin>3.2.0</exec-maven-plugin>
<versions-maven-plugin>2.16.2</versions-maven-plugin>
<javafx.version>21</javafx.version>
<javafx-maven-plugin>0.0.8</javafx-maven-plugin>
<gluonfx-maven-plugin>1.0.21</gluonfx-maven-plugin>
<imageName>igram</imageName>
<maven-antrun-plugin>3.1.0</maven-antrun-plugin>
<imageName>iget</imageName>
<mainClass>com.simtechdata.Main</mainClass>
<graalFolder>${project.basedir}/graalvm</graalFolder>
<system-linker-arg/>
<system-native-image-arg/>
<compatibility-arg/>
Expand All @@ -43,7 +41,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
<version>2.0.12</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand Down Expand Up @@ -131,7 +129,7 @@
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>iGet</finalName>
<finalName>${name}</finalName>
</configuration>
<executions>
<execution>
Expand All @@ -151,7 +149,6 @@
<configuration>
<source>22</source>
<target>22</target>
<release>22</release>
<compilerArgs>--enable-preview</compilerArgs>
</configuration>
</plugin>
Expand All @@ -171,4 +168,52 @@
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven_central</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>
<profiles>
<!--native profile-->
<profile>
<id>native</id>
<build>
<plugins>
<!-- GraalVM Native Maven Plugin -->
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${native-maven-plugin}</version>
<extensions>true</extensions>
<configuration>
<target>${java.version}</target>
<imageName>${imageName}</imageName>
<mainClass>${mainClass}</mainClass>
<verbose>true</verbose>
<buildArgs>
<arg>-Djava.awt.headless=true</arg>
<arg>--no-fallback</arg>
<arg>--verbose</arg>
<arg>--enable-preview</arg>
<arg>--initialize-at-build-time=org.sqlite.util.ProcessRunner</arg>
<arg>-cp
${user.home}/.m2/repository/org/xerial/sqlite-jdbc/3.45.3.0/sqlite-jdbc-3.45.3.0.jar
</arg>
<arg>-march=compatibility</arg>
<arg>-H:+UnlockExperimentalVMOptions</arg>
<arg>-H:+ReportExceptionStackTraces</arg>
<arg>-H:JNIConfigurationFiles=${graalFolder}/jni-config.json</arg>
<arg>-H:DynamicProxyConfigurationFiles=${graalFolder}/proxy-config.json</arg>
<arg>-H:ReflectionConfigurationFiles=${graalFolder}/reflect-config.json</arg>
<arg>-H:ResourceConfigurationFiles=${graalFolder}/resource-config.json</arg>
<arg>-H:SerializationConfigurationFiles=${graalFolder}/serialization-config.json</arg>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
12 changes: 9 additions & 3 deletions src/main/java/com/simtechdata/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void write(int b) {
case "checkbrowser" -> SQLite.checkBrowser();
case "setbrowserpath" -> Actions.setBrowserPath();
case "setbrowser" -> Actions.setBrowser();
case "get" -> {
case "get", "g" -> {
if (args.length > 1) {
Actions.downloadLink(args[1]);
}
Expand All @@ -77,6 +77,11 @@ public void write(int b) {
case "list", "show" -> Actions.showLinks(State.NEW);
case "?", "--help" -> showHelp();
case "cmds" -> Actions.showCommands();
case "sb" -> {
String search = args[1];
Actions.searchBrowser(search);
System.exit(0);
}
case "history" -> {
System.out.println(STR."\{NL}Showing Downloaded Links:\{NL}");
Actions.showLinks(State.DOWNLOADED);
Expand Down Expand Up @@ -122,8 +127,8 @@ private static void showHelp() {
(http must begin the link to be recognized as a link)
Options:
get - Download links in que
get <url> - download one URL right now
get - Download links in que (can also use g)
get <url> - download one URL right now (can also use g)mac
watch - Watch mode looks for links to show up in clipboard then downloads them
setFolder - Set the folder where downloads get stored
setBrowser - Set which browser you use for Instagram (this helps prevent download failures)
Expand All @@ -135,6 +140,7 @@ private static void showHelp() {
remove - Remove one link from the download list (A menu will be provided)
failed - Show links that failed to download
version - Show iGet version number
sb <word> - Search browser history for word. Will offer list and selected link will go to clipboard
browserHistory - show ALL of the links that are in your browsers history
checkBrowser - Lets you verify that iGet can find the History file for your web browser
setBrowserPath - Lets you set the path to the browser History file if the above option does not find it.
Expand Down
Loading

0 comments on commit 151348f

Please sign in to comment.