Giter Site home page Giter Site logo

gofileview's Introduction

go File View

Go File View是受kkFileView( https://gitee.com/kekingcn/file-online-preview.git )启发并基于其网站前端开发的。目前goFileView处于最原始的起步状态,相对简陋,相信随着不断完善成为一套强壮的系统。本人代码风格相对较”狂”,欢迎大家一起来提出建议和完善Go File View。

特别要感谢kkfileview的开源,让我可以使用它的前端页面直接开发。调用方式也在很大程度上参考了kkfileview。

目前仅支持Linux系统,因为时间仓促,从我有想法到写出这个beta版,只有半天时间,所以可能有很多问题,比如url不支持中文等问题。请大家见谅,我目前也只是在Win10 WSL Ubuntu里完成了测试。

本次更新,主要是对Ubuntu系统做了完美适配,目前goFileView已经可以完美运行在Ubuntu机器上了。目前鄙人正在实习,可能会更新较慢,请见谅。

上面是预览效果(顺便给我自己打打广告,手动滑稽)

目前已经完成

Word、Excel、PPT转码为PDF

PDF转码为图片

对Word,Excel,PPT和PDF的图片式在线预览

未来

PDF文件直接在线预览

PDF转SVG矢量图形

多文件的接受

ftp、xftp、scp等文件传输形式的兼容

内置Fire Server

本地路径指定,省去下载步骤

部署编译

准备

安装Libreoffice

安装convert

确保Libreoffice和conver都在path目录下

编译

git clone https://github.com/leeli73/goFileView.git

cd goFileView

go build main.go

在自己的项目中集成

准备

go get github.com/leeli73/goFileView

demo

package main

import(

"net/http"

"github.com/leeli73/goFileView/perview"

)

func index(w http.ResponseWriter, r *http.Request) {

w.Write([]byte("I'm Index"))

}

func main(){

perview.Init("/perview/","no") //初始化

http.HandleFunc("/index",index)

http.HandleFunc("/perview/",perview.Handle) //绑定到preview的Handle

http.ListenAndServe(":80", nil)

}

gofileview's People

Contributors

leeli73 avatar

Watchers

James Cloos 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.