Skip to content
Snippets Groups Projects
Commit 38112a57 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

initial commit

parent eea01b44
No related branches found
No related tags found
No related merge requests found
Showing
with 291 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/controlsfx"/>
<classpathentry kind="output" path="class"/>
</classpath>
.project 0 → 100644
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>SaveMyPlaylist</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
[CHANGELOG]
===========
SaveMyPlaylist
==============
>>> start-date: 2015
>>> status-date: 2015
____________________________________________________
v.1.0.0 - (1)
===============
-basic implementation
>>> end-work: 2015
____________________________________________________
[/CHANGELOG]
\ No newline at end of file
# SaveMyPlaylist # SaveMyPlaylist
- startdate: 2015
- current version: 1.0.0 (1) - 2015
### Description
Saves all channel- and videonames from a public Youtubeplaylist into a textfile.
If there are already texfiles existing for that playlist-ID the last textfile will be compared to the current date.
Possibly missing videos will then be printed at the bottom of the new textfile.
\ No newline at end of file
<?xml version="1.0" encoding="ASCII"?>
<anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build">
<deploy>
<application name="SaveMyPlaylist"/>
<info/>
</deploy>
<signjar/>
</anttasks:AntTask>
File added
File added
<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>C:\Users\Robert\Documents\eclipse\compiled\SaveMyPlaylist\SaveMyPlaylist.jar</jar>
<outfile>C:\Users\Robert\Documents\eclipse\compiled\SaveMyPlaylist\SaveMyPlaylist.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>C:\Users\Robert\Documents\eclipse\compiled\SaveMyPlaylist\list.ico</icon>
<classPath>
<mainClass>application.Main</mainClass>
<cp>.</cp>
</classPath>
<jre>
<path></path>
<bundledJre64Bit>false</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion>1.8.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
</jre>
</launch4jConfig>
\ No newline at end of file
build/list.ico

361 KiB

build/list.png

3.68 KiB

File added
File added
File added
File added
File added
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane prefHeight="290.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.Controller">
<children>
<Label layoutX="218.0" layoutY="29.0" text="SaveMyPlaylist">
<font>
<Font name="System Bold" size="25.0" />
</font>
</Label>
<Button fx:id="buttonPath" layoutX="424.0" layoutY="115.0" mnemonicParsing="false" onAction="#buttonPath" text="Speicherort wählen" />
<Button fx:id="buttonSave" layoutX="256.0" layoutY="230.0" mnemonicParsing="false" onAction="#buttonSave" text="Speichern">
<font>
<Font name="System Bold" size="14.0" />
</font>
</Button>
<TextField fx:id="textFieldPath" editable="false" layoutX="173.0" layoutY="115.0" prefHeight="25.0" prefWidth="231.0" />
<TextField fx:id="textFieldID" layoutX="173.0" layoutY="175.0" prefHeight="25.0" prefWidth="231.0" />
<Label layoutX="69.0" layoutY="175.0" text="Playlist-ID:">
<font>
<Font name="System Bold" size="16.0" />
</font>
</Label>
<Label layoutX="59.0" layoutY="115.0" text="Speicherort:">
<font>
<Font name="System Bold" size="16.0" />
</font>
</Label>
<ImageView fx:id="imageView" fitHeight="45.0" fitWidth="45.0" layoutX="164.0" layoutY="25.0" pickOnBounds="true" preserveRatio="true" />
<ProgressIndicator fx:id="progressIndicator" layoutX="353.0" layoutY="227.0" prefHeight="36.0" prefWidth="25.0" />
</children>
</AnchorPane>
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */
\ No newline at end of file
class/application/list.png

3.68 KiB

package application;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Button;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.TextField;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.stage.DirectoryChooser;
import javafx.stage.Stage;
public class Controller implements Initializable
{
@FXML
private TextField textFieldPath;
@FXML
private TextField textFieldID;
@FXML
public Button buttonPath;
@FXML
public Button buttonSave;
@FXML
private ImageView imageView;
@FXML
public ProgressIndicator progressIndicator;
public Stage stage;
private boolean pathSelected;
private String path;
public boolean running;
public PlaylistThread thread;
public static File[] files;
public void setStage(Stage s)
{
stage = s;
}
@FXML
public void buttonPath(ActionEvent e)
{
DirectoryChooser chooser = new DirectoryChooser();
chooser.setTitle("Speicherort auswhlen");
File file = chooser.showDialog(stage);
if(file!=null)
{
path = file.getPath() + "\\";
textFieldPath.setText(path);
pathSelected = true;
files = file.listFiles();
}
}
@FXML
public void buttonSave(ActionEvent e)
{
if(pathSelected)
{
String ID = textFieldID.getText();
if(ID.equals(""))
{
Alert alert = new Alert(AlertType.WARNING);
alert.setTitle("Achtung");
alert.setHeaderText("");
alert.getDialogPane().setPrefSize(350, 120);
alert.setContentText("Bitte eine Playlist-ID eingeben!");
alert.initOwner(stage);
alert.showAndWait();
}
else
{
progressIndicator.setVisible(true);
buttonPath.setDisable(true);
buttonSave.setDisable(true);
imageView.requestFocus();
running = true;
thread = new PlaylistThread();
thread.path = path;
thread.ID = ID;
thread.controller = this;
thread.stage = this.stage;
thread.start();
}
}
else
{
Alert alert = new Alert(AlertType.WARNING);
alert.setTitle("Achtung");
alert.setHeaderText("");
alert.getDialogPane().setPrefSize(350, 120);
alert.setContentText("Bitte einen Speicherort auswhlen!");
alert.initOwner(stage);
alert.showAndWait();
}
}
@Override
public void initialize(URL arg0, ResourceBundle arg1)
{
pathSelected = false;
Image icon = new Image("/application/list.png");
imageView.setImage(icon);
progressIndicator.setVisible(false);
running = false;
try
{
String jarPath = Controller.class.getProtectionDomain().getCodeSource().getLocation().getPath();
String decodedPath = URLDecoder.decode(jarPath, "UTF-8");
decodedPath = decodedPath.substring(1, decodedPath.length());
int start = decodedPath.lastIndexOf("/");
decodedPath = decodedPath.substring(0, start+1);
textFieldPath.setText(decodedPath);
path = decodedPath;
pathSelected = true;
refreshFiles();
}
catch(UnsupportedEncodingException e)
{
e.printStackTrace();
}
}
public void refreshFiles()
{
File newFile = new File(path);
files = newFile.listFiles();
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment